; /////////////////////////////////////////////////////////////////////////////
;
;     This file is part of PurePicBasic.
; 
;     PurePicBasic is free software: you can redistribute it And/Or modify
;     it under the terms of the GNU General Public License As published by
;     the Free Software Foundation, either version 3 of the License, Or
;     (at your option) any later version.
; 
;     PurePicBasic is distributed in the hope that it will be useful,
;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;     MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE.  See the
;     GNU General Public License For more details.
; 
;     You should have received a copy of the GNU General Public License
;     along With PurePicBasic.  If Not, see <http://www.gnu.org/licenses/>.
;
; /////////////////////////////////////////////////////////////////////////////
XIncludeFile "structures.pbi"

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure _create_preprocessor_macro_(symbol.s, value.s, line.i)
  preprocessor(symbol)\declaredAtLine   = line
  preprocessor(symbol)\symbol           = symbol
  preprocessor(symbol)\value            = value
EndProcedure

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure.b _preprocessor_symbol_exist_(symbol.s)
  If FindMapElement(preprocessor(), symbol) <> 0
    ProcedureReturn #True 
  Else
    ProcedureReturn #False 
  EndIf 
EndProcedure

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure.s _preprocessor_value_(symbol.s)
  ProcedureReturn preprocessor(symbol)\value
EndProcedure